package com.crgp.platform.launcher;

import com.crgp.platform.gui.MainWindow;
import com.crgp.platform.xml.XMLReader;
import com.crgp.platform.xml.bean.GameBean;
import com.crgp.server.Server;

/**
 * 启动器
 * 
 * @author XJiang
 * 
 */
public class PlatformLauncher {
	public static void main(String[] args) {
		try {
			// 启动服务器
			new Thread(new Server()).start();

			// 获得启动游戏对象
			GameBean gameLaunchBean = XMLReader.readGameLaunchBean();
			MainWindow window = new MainWindow(gameLaunchBean);
			window.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}